export default ({ http }) => ({
  /**
   * 学习中心
   */
  // 最近学习课程
  getCourseRecordFetch(query, response) {
    return http.get('/course/base/record/fetch', query, response)
  },

  // 我的学习记录
  getCourseRecordList(query, response) {
    return http.get('/course/base/record/list', query, response)
  },

  // 我的课程
  getRecordCourse(query, response) {
    return http.get('/course/base/record/course', query, response)
  },

  // 我的互动
  getCourseCommentMine(query, response) {
    return http.get('/course/base/comment/mine', query, response)
  },

  // 我的证书
  getCourseStudentCert(query, response) {
    return http.get('/course/base/student/cert', query, response)
  },

  // 证书详情
  getCourseStudentCertDetail(query, response) {
    return http.get('/course/base/student/cert/detail', query, response)
  },

  /**
   * 班级中心
   */

  // 任教班级
  getCourseclassesTeach(query, response) {
    return http.get('/course/classes/teach', query, response, {})
  },

  // 学员
  getCourseclassesStudents(id, response) {
    return http.get(`/course/classes/${id}/students`, {}, response, {})
  },

  // 移除学员
  deleteCourseclassesStudents(id, userId, response, error) {
    return http.delete(`/course/classes/${id}/student/${userId}`, {}, response, error, false)
  },

  // 我的待考-指派考试
  getUserExamRecordStudent(query, response) {
    return http.get(`/user/exam/record/student`, query, response)
  },

  // 我的待考-购买考试
  getUserExamRecordOrder(query, response) {
    return http.get(`/user/exam/record/order`, query, response)
  },

  // 我的待考-购买考试
  getUserExamRecordRollup(id, response) {
    return http.get(`/user/exam/record/rollup/${id}`, {}, response)
  }
})
